package vn.fpt.snake.ui;

import java.awt.Graphics;
import java.awt.Point;
import java.awt.event.KeyEvent;
import java.util.HashMap;
import vn.fpt.snake.controller.GameControllerImpl;
import vn.fpt.snake.view.Board;

public class OptionViewImpl implements IView {
	Board parent;
	HashMap<String, Point> resolution;
	GameControllerImpl gameController;
	int choice;
	public OptionViewImpl(Board parent){
		this.parent = parent;
		gameController = new GameControllerImpl();
		
	}
	
	@Override
	public void onPaint(Graphics g) {
		// TODO Auto-generated method stub
		//Settings settings = gameController.getSettings();
		//int dotSize = settings.getDotSize();
		
		//Font font = new Font("Arial", Font.BOLD, dotSize);
		//FontMetrics metrics = g.getFontMetrics(font);
		
		if(resolution == null){
			String option1 = "Resolution : << 640 x 480 >>";	
			String option2 = "Resolution : << 800 x 600 >>";
			String option3 = "Resolution : << 1024 x 768 >>";

			Point point1 = new Point(640, 480);
			Point point2 = new Point(800, 600);
			Point point3 = new Point(1024, 768);
			
			resolution = new HashMap<>();
			resolution.put(option1, point1);
			resolution.put(option2, point2);
			resolution.put(option3, point3);
		}
		

	}
	@Override
	public void keyPressed(KeyEvent arg) {
		// TODO Auto-generated method stub
		int keyCode = arg.getKeyCode();
		if(parent._view instanceof OptionViewImpl){
			if(keyCode == KeyEvent.VK_A){
				
			}else if(keyCode == KeyEvent.VK_D){
				
			}else if(keyCode == KeyEvent.VK_ENTER){
				
			}
		}
	}
	@Override
	public void keyReleased(KeyEvent e) {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void keyTyped(KeyEvent e) {
		// TODO Auto-generated method stub
		
	}

}
